<!DOCTYPE html>
<html>

	<head>
		<include file="Public/head" />
		<title>登录--{$config['store_name']}</title>
		<link rel="shortcut icon" href="http://www.cclx.com/onstage/images/favicon.ico" />
		<link rel="apple-touch-icon" href="http://www.cclx.com/onstage/images/favicon.ico" />
	</head>
	<style>
		body {
			background: #e5e5e5 url(__STATIC__/images/login_b.jpg) no-repeat center fixed;
		}
	</style>

	<body>

		<div class="loregbox ">
			<div class="loregbox_in  loregbox_in_new loregbox_in_new_reg">
				<div class="loginbox clearfix">
					<div class="l_logo">
						<a href="{:U('Index/index')}" title="返回首页" name="login-logo"><img src="{$config['store_logo']}"></a>
					</div>
					<div class="formleft tan_p">
						<!--登录-->
						<h2>登录<span><a href="{:U('register',array('refer'=>'login'))}" name="login-zhuce">立即注册&gt;</a></span></h2>
						<form class="loginForm" method="post" id="loginForm">
							<div class="forminput">
								<input id="username" name="username" class="valifytext" type="text" placeholder="用户名" autocomplete="OFF">
								<span class="wrong left" style="display: none" id="user_msg">填写正确的邮箱格式</span>
								<span class="duihao" style="display: none"></span>
							</div>
							<div class="forminput">
								<input id="password" name="password" type="password" class="valifytext" placeholder="请输入密码">
								<span class="wrong left" style="display: none" id="pwd_msg">填写6-32个字符</span>
								<span class="duihao" style="display: none"></span>
							</div>
							<!--<div class="regist_qie black">
								<a href="javascript::" name="login-mima">忘记密码?</a>
							</div>-->
							<div class="formbtn"><input name="login-tijiaodenglu" type="button" class="submit_btn" value="登录" onclick="login_ajax()" style="outline: none;"></div>
						</form>
						<!--登录end-->
						<!--合作登录-->
						<!--<div class="hezuo">
                    <div class="line_hezuo"><h4 class="tc">使用合作账号快速登录</h4></div>
                    <div class="b_hezuo">
                        <a href="javascript:;" id="qq_login" name="qq-denglu"><img src="http://static.uthing.cn/images-2.1/login/qq.jpg">&nbsp;QQ</a>
                        <a href="javascript:;" id="wb_login" name="weibo-denglu"><img src="http://static.uthing.cn/images-2.1/login/weibo.jpg">&nbsp;微博</a>
                        <a href="javascript:;" id="wx_login"><img src="http://static.uthing.cn/images-2.1/login/weixin.jpg">&nbsp;微信</a>
                        
                    </div>-->
						<!--合作登录end-->
					</div>
				</div>
			</div>
		</div>
		</div>

		<script>
			function login_ajax() {
				if($('#username').val() == "") {
					layer.alert('帐号不能为空', {
						icon: 2
					});
					return;
				}
				if($('#password').val() == "") {
					layer.alert('密码不能为空', {
						icon: 2
					});
					return;
				}

				var data = $("#loginForm").serialize();
				var url = "{:U('User/login_ajax')}";
				ajax(url, 'post', data, login_back);

			}

			function login_back(data) {
				if(data.status == 1) {
					layer.alert(data.msg, {
						icon: 1
					});
					window.location.href = data.url;
				} else {
					layer.alert(data.msg, {
						icon: 2
					});

				}
			}
		</script>

	</body>

</html>